home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume13 / nroff-driver < prev    next >
Encoding:
Internet Message Format  |  1988-01-31  |  40.7 KB

  1. Subject:  v13i069:  Nroff driver table utility
  2. Newsgroups: comp.sources.unix,comp.text
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: utzoo!bnr-vpa!bruce
  7. Posting-number: Volume 13, Issue 69
  8. Archive-name: nroff-driver
  9.  
  10.  
  11.     What follows is a shar of the latest version of my nroff driver
  12. table facility, which has been used in two previous incarnations by a
  13. core group of die-hard nroff users.  This version fixes some bugs, adds
  14. some functionality, and accomodates HP's latest perversion of nroff.
  15.  
  16. Bruce Townsend (bnr-vpa!bruce)    Phone:    (613) 726-3008
  17. Bell-Northern Research        Usenet: {utzoo, utcs}!bnr-vpa!bruce
  18. P.O. Box 3511, Station C, Ottawa, Ontario, Canada, K1Y 4H7
  19.  
  20. #!/bin/sh
  21. # This is a shell archive, meaning:
  22. # 1. Remove everything above the #!/bin/sh line.
  23. # 2. Save the resulting text in a file.
  24. # 3. Execute the file with /bin/sh (not csh) to create the files:
  25. #    README
  26. #    Makefile
  27. #    table.5
  28. #    elbat.c
  29. #    table.c
  30. #    table.h
  31. #    tabljet.c
  32. export PATH; PATH=/bin:$PATH
  33. echo shar: extracting "'README'" '(4429 characters)'
  34. if test -f 'README'
  35. then
  36.     echo shar: over-writing existing file "'README'"
  37. fi
  38. sed 's/^X//' << \SHAR_EOF > 'README'
  39. X    Nroff Driver Table Compiler/De-compiler Utility
  40. X    -----------------------------------------------
  41. X
  42. X    There are two programs in this package.  Table compiles an
  43. Xnroff terminal driver table from source, and elbat, the inverse
  44. Xoperator, de-compiles an existing formatted table to produce a
  45. Xsource.  There is also a sample driver source, kindly provided by
  46. XBo Thide', for the HP LaserJet+ using a Math Elite font cartridge.
  47. XA man page, a Makefile, and this README file are also provided.
  48. X
  49. X    This is version 2.0 of the table utility, superceding versions
  50. X1.1 and 1.2.  New features of version 2.0 are:
  51. X-  Support for Kanji characters.  There is a new element in the table
  52. X   called Kchar.  This is a feature of HP's latest release for their
  53. X   9000 series computers.
  54. X-  A better Makefile.
  55. X-  A -d debug option for elbat.
  56. X-  The compiled table should now be bit-for-bit identical to that
  57. X   supplied with your system, given the same source file.  To test this,
  58. X   decompile a supplied tabfile with elbat, recompile the resultant
  59. X   source, and cmp the result with the supplied tabfile.  This is true
  60. X   at least for the files on my system (HP9000 series 520, HPUX 5.2)
  61. X-  Several bugs fixed.
  62. X-  A man page, table.5
  63. X
  64. X    Sources for the tab files are in 'C', and consist simply of
  65. Xan initialized structure.  This structure is compiled and linked to
  66. Xthe main program module, table.o (compiled from table.c), to
  67. Xproduce an executable a.out file.  This file when executed produces
  68. Xthe compiled tab file.
  69. X    A Makefile is provided to formalize this procedure.  The
  70. Xsources for the various terminals (all files named tabXXXX.c, where
  71. XXXXX is replaced by a short acronym for the terminal: e.g. tab450.c)
  72. Xare included the the SOURCES definition in the Makefile.  Typing
  73. X"make" or "make all" compiles these sources, and runs the executable
  74. Xa.out files to produce the compiled tab files, calling them tabXXXX.tab.
  75. XTyping "make install" renames the tabXXXX.tab files to tabXXXX, and
  76. Xcopies them to the /usr/lib/term directory, where nroff will find
  77. Xthem when the -TXXXX option is used.
  78. X    Typing "make elbat" makes the elbat program, which can take
  79. Xa compiled tabXXXX file and produce a source tabXXXX.c file.  Using
  80. Xthe -d (debug) option with elbat produces a dump of the actual
  81. Xcharacter data in the file.
  82. X    Be VERY CAREFUL with "make install" (try "make -n install
  83. Xfirst).  You don't likely want to delete system-supplied tab files!
  84. X
  85. X    The table.5 man page contains more information.
  86. X
  87. XIF YOU HAVE PROBLEMS...
  88. X    It is quite possible that the tab file format on your machine
  89. Xdiffers in minor or major ways from that embodied by this utility.  Since
  90. Xthe tabfile format was inferred from careful examination of a small number
  91. Xof supplied tab files on one system only, there is no guarantee that it
  92. Xwill work on all systems.  One major potential problem is in the
  93. Xinclusion/exculsion of the Kchar (Kanji) element in the tabfile structure.
  94. XUse elbat to decompile an existing tabfile; it should tell you if the
  95. Xtabfile size is inconsistent with the content.  If this is so, change
  96. Xthe "#define KANJI" line in the Makefile, and try again.
  97. X
  98. XAcknowledgements:
  99. X    Ian Darwin tested out the first (very buggy) version of
  100. Xthis utility, and suggested many useful changes, including the
  101. Xintroduction of the Makefile.
  102. X
  103. X    Matt Crawford wrote the elbat program originally for
  104. XBerkeley systems.
  105. X
  106. XCaveat:
  107. X    This utility was written to permit the author to configure nroff
  108. Xon his machine for terminals/fonts unsupported by the supplied tabfiles.
  109. XIt was not intended as a universal utility applicable to all machines
  110. Xor versions of unix.  It has been released without any guarantee whatsoever.
  111. XThe author does not intend to support this software to any extent, and
  112. Xusers should understand that future changes to their system software may
  113. Xbreak this utility.  This being so, it would be foolish to depend too
  114. Xheavily on the functionality that this utility provides.
  115. X
  116. X    Copyright (c) 1987 by Bruce Townsend and Bell-Northern Research.
  117. X    Permission is granted to use and distribute, except for profit,
  118. X    providing this copyright notice and the author's name is included.
  119. X    No warranty of any kind is expressed or implied, and no liability of
  120. X    any kind is assumed by either the author or Bell-Northern Research.
  121. X
  122. X---
  123. XBruce Townsend (bnr-vpa!bruce)    Phone:    (613) 726-3008
  124. XBell-Northern Research        Usenet: {utzoo, utcs}!bnr-vpa!bruce
  125. XP.O. Box 3511, Station C, Ottawa, Ontario, Canada, K1Y 4H7
  126. SHAR_EOF
  127. if test 4429 -ne "`wc -c 'README'`"
  128. then
  129.     echo shar: error transmitting "'README'" '(should have been 4429 characters)'
  130. fi
  131. echo shar: extracting "'Makefile'" '(2020 characters)'
  132. if test -f 'Makefile'
  133. then
  134.     echo shar: over-writing existing file "'Makefile'"
  135. fi
  136. sed 's/^X//' << \SHAR_EOF > 'Makefile'
  137. X###############################################################################
  138. X#
  139. X#    table (version 2.0) - a utility for creating nroff driver tables.
  140. X#
  141. X#    Makefile for nroff driver tables under USG UNIX.
  142. X#    Written by Bruce Townsend Oct, 1987.
  143. X#
  144. X#    Copyright (c) 1987 by Bruce Townsend and Bell-Northern Research.
  145. X#    Permission is granted to use and distribute, except for profit,
  146. X#    providing this copyright notice and the author's name is included.
  147. X#    No warranty of any kind is expressed or implied, and no liability of
  148. X#    any kind is assumed by either the author or Bell-Northern Research.
  149. X#
  150. X###############################################################################
  151. X
  152. X###############################################################################
  153. X#    User-Configurable Section
  154. X#
  155. XSOURCES =    tabljet.c
  156. X
  157. XDESTDIR =    /usr/lib/term
  158. X# Include the KANJI flag if your nroff supports Kanji characters
  159. X# CFLAGS =    -O -DKANJI
  160. XCFLAGS =    -O
  161. XLDFLAGS =    -s
  162. X#
  163. X#    End of User-Configurable Section
  164. X###############################################################################
  165. X
  166. XTABFILES =    $(SOURCES:.c=.tab)
  167. XTABS =        $(SOURCES:.c=)
  168. XLINTSRC =    tabXXX.c
  169. XSHELL =        /bin/sh
  170. X
  171. X.SUFFIXES:    .tab
  172. X
  173. X.o.tab:
  174. X    cc $(LDFLAGS) table.o $*.o
  175. X    ./a.out $@
  176. X
  177. X.c.tab:
  178. X    cc -c $(CFLAGS) $<
  179. X    cc $(LDFLAGS) table.o $*.o
  180. X    ./a.out $@
  181. X
  182. X
  183. Xall:        $(TABFILES)
  184. X
  185. Xtable:        $(TABFILES)
  186. X
  187. X$(TABFILES):    table.o
  188. X
  189. X$(TABS):    $(TABFILES)
  190. X        cp $@.tab $@
  191. X
  192. Xtable.o:    table.c table.h
  193. X        cc -c $(CFLAGS) table.c
  194. X
  195. Xinstall:    $(TABS)
  196. X        cp $(TABS) $(DESTDIR)
  197. X        rm $(TABS)
  198. X
  199. Xlint:        table.c elbat.c structure.c table.h
  200. X        lint $(LFLAGS) table.c $(LINTSRC)
  201. X        lint $(LFLAGS) elbat.c structure.c
  202. X
  203. Xelbat:        elbat.o structure.o
  204. X            cc $(LDFLAGS) -o elbat elbat.o structure.o
  205. X
  206. Xstructure.c:    table.h
  207. X        echo 'char    *structure = "\' > structure.c
  208. X        sed -n -e '1,/zzz/s/$$/\\n\\/p' table.h >> structure.c
  209. X        echo '";' >> structure.c
  210. X
  211. Xshar:
  212. X        shar -a README Makefile table.5 elbat.c table.c table.h \
  213. X            $(SOURCES) > TABLE.shar
  214. X
  215. Xclean:
  216. X        rm -f a.out *.o core structure.c
  217. X
  218. Xrealclean:    clean
  219. X        rm -f $(TABFILES) $(TABS) elbat
  220. SHAR_EOF
  221. if test 2020 -ne "`wc -c 'Makefile'`"
  222. then
  223.     echo shar: error transmitting "'Makefile'" '(should have been 2020 characters)'
  224. fi
  225. echo shar: extracting "'table.5'" '(8271 characters)'
  226. if test -f 'table.5'
  227. then
  228.     echo shar: over-writing existing file "'table.5'"
  229. fi
  230. sed 's/^X//' << \SHAR_EOF > 'table.5'
  231. X.TH TABLE 5
  232. X.SH NAME
  233. Xtable, elbat \- compile/de-compile terminal driver tables for nroff
  234. X.SH SYNOPSIS
  235. X.B elbat
  236. X[
  237. X.B \-d
  238. X]
  239. X.BI tab name
  240. X>
  241. X.BI tab name .c
  242. X.br
  243. X.B make
  244. X[
  245. X.B all
  246. X] [
  247. X.B install
  248. X]
  249. X.br
  250. X.SH DESCRIPTION
  251. X.IR Nroff (1)
  252. Xuses driver tables to customize its output for various types of
  253. Xoutput devices, such as terminals, special printers (such as Diablo),
  254. Xor special output filter programs.
  255. XDriving tables are normally supplied for a small number of devices,
  256. Xbut no utility is normally supplied to create or modify additional
  257. Xdriver tables, at least for USG systems.
  258. X(Berkeley systems apparently have this capability supplied.)
  259. XThe
  260. X.I table
  261. Xutility allows a user to compile and de-compile
  262. X.I nroff
  263. Xdriver tables.
  264. X.PP
  265. XThe
  266. X.I nroff
  267. X\fB-T\fIname\fR
  268. Xoption
  269. Xtells nroff to use the driver table
  270. X.BI /usr/lib/term/tab name
  271. Xto format the output for a particular printer.
  272. XThe driver table is specified by a structure
  273. X.B t
  274. Xwhich is given by a source file
  275. X.BI tab name .c.
  276. XThe structure of
  277. X.B t
  278. Xis as follows:
  279. X.PP
  280. X.nf
  281. X.ta 5m 10m 15m 20m 25m 30m 35m 40m 45m 50m 55m 60m
  282. X#define    INCH    240
  283. X
  284. Xstruct t {
  285. X    int bset;
  286. X    int breset;
  287. X    int Hor;
  288. X    int Vert;
  289. X    int Newline;
  290. X    int Char;
  291. X#ifdef KANJI
  292. X    int Kchar;
  293. X#endif KANJI
  294. X    int Em;
  295. X    int Halfline;
  296. X    int Adj;
  297. X    char *twinit;
  298. X    char *twrest;
  299. X    char *twnl;
  300. X    char *hlr;
  301. X    char *hlf;
  302. X    char *flr;
  303. X    char *bdon;
  304. X    char *bdoff;
  305. X    char *iton;
  306. X    char *itoff;
  307. X    char *ploton;
  308. X    char *plotoff;
  309. X    char *up;
  310. X    char *down;
  311. X    char *right;
  312. X    char *left;
  313. X    char *codetab[256-32];
  314. X    char *zzz;
  315. X    } t;
  316. X.fi
  317. X.DT
  318. X.PP
  319. XThe meanings of the various fields are as follows:
  320. X.TP 10
  321. X.I bset\^
  322. Xbits to set in the
  323. X.I c_oflag\^
  324. Xfield of the
  325. X.I termio\^
  326. Xstructure (see
  327. X.IR tty (4))
  328. Xbefore output.
  329. X.TP 10
  330. X.I breset\^
  331. Xbits to reset in the
  332. X.I c_oflag\^
  333. Xfield of the
  334. X.I termio\^
  335. Xstructure
  336. Xbefore output.
  337. X.TP 10
  338. X.I Hor\^
  339. Xhorizontal resolution in fractions of an inch.
  340. X.TP 10
  341. X.I Vert\^
  342. Xvertical resolution in fractions of an inch.
  343. X.TP 10
  344. X.I Newline\^
  345. Xspace moved by a newline (linefeed) character in fractions
  346. Xof an inch.
  347. X.TP 10
  348. X.I Char\^
  349. Xquantum of character sizes, in fractions of an inch.
  350. X(i.e., a character is a multiple of Char units wide)
  351. X.TP 10
  352. X.I Kchar\^
  353. Xquantum of Kanji character sizes, in fractions of an inch.
  354. X(i.e., a Kanji character is a multiple of Kchar units wide)
  355. XMany systems do not have this element included in the structure.
  356. X.TP 10
  357. X.I Em\^
  358. Xsize of an em in fractions of an inch.
  359. X.TP 10
  360. X.I Halfline\^
  361. Xspace moved by a half-linefeed (or half-reverse-linefeed)
  362. Xcharacter in fractions of an inch.
  363. X.TP 10
  364. X.I Adj\^
  365. Xquantum of white space, in fractions of an inch.
  366. X(i.e., white spaces are a multiple of Adj units wide)
  367. X.IP
  368. XNote: if this is less than the size of the space
  369. Xcharacter (in units of Char; see below for how the
  370. Xsizes of characters are defined),
  371. X.I nroff\^
  372. Xwill output
  373. Xfractional spaces using plot mode.  Also, if the
  374. X.B \-e
  375. Xswitch to
  376. X.I nroff\^
  377. Xis used, Adj is set equal to Hor by
  378. X.IR nroff .
  379. X.TP 10
  380. X.I twinit\^
  381. Xset of characters used to initialize the terminal
  382. Xin a mode suitable for
  383. X.IR nroff .
  384. X.TP 10
  385. X.I twrest\^
  386. Xset of characters used to restore the terminal to
  387. Xnormal mode.
  388. X.TP 10
  389. X.I twnl\^
  390. Xset of characters used to move down one line.
  391. X.TP 10
  392. X.I hlr\^
  393. Xset of characters used to move up one-half line.
  394. X.TP 10
  395. X.I hlf\^
  396. Xset of characters used to move down one-half line.
  397. X.TP 10
  398. X.I flr\^
  399. Xset of characters used to move up one line.
  400. X.TP 10
  401. X.I bdon\^
  402. Xset of characters used to turn on hardware boldface mode,
  403. Xif any.
  404. X.I Nroff\^
  405. Xassumes that boldface mode is reset automatically by the
  406. X.I twnl\^
  407. Xstring, because many letter-quality printers reset the boldface
  408. Xmode when they receive a carriage return;
  409. Xthe
  410. X.I twnl\^
  411. Xstring should include whatever characters are necessary to
  412. Xreset the boldface mode.
  413. X.TP 10
  414. X.I bdoff\^
  415. Xset of characters used to turn off hardware boldface mode,
  416. Xif any.
  417. X.TP 10
  418. X.I iton\^
  419. Xset of characters used to turn on hardware italics mode,
  420. Xif any.
  421. X.TP 10
  422. X.I itoff\^
  423. Xset of characters used to turn off hardware italics mode,
  424. Xif any.
  425. X.TP 10
  426. X.I ploton\^
  427. Xset of characters used to turn on hardware plot mode
  428. X(for Diablo type mechanisms), if any.
  429. X.TP 10
  430. X.I plotoff\^
  431. Xset of characters used to turn off hardware plot mode
  432. X(for Diablo type mechanisms), if any.
  433. X.TP 10
  434. X.I up\^
  435. Xset of characters used to move up one resolution unit
  436. X(Vert) in plot mode, if any.
  437. X.TP 10
  438. X.I down\^
  439. Xset of characters used to move down one resolution unit
  440. X(Vert) in plot mode, if any.
  441. X.TP 10
  442. X.I right\^
  443. Xset of characters used to move right one resolution unit
  444. X(Hor) in plot mode, if any.
  445. X.TP 10
  446. X.I left\^
  447. Xset of characters used to move left one resolution unit
  448. X(Hor) in plot mode, if any.
  449. X.TP 10
  450. X.I codetab\^
  451. Xdefinition of characters needed to print an
  452. X.I nroff\^
  453. Xcharacter
  454. Xon the terminal.
  455. XThe first byte is the number of character units (Char) needed to hold the
  456. Xcharacter; i.e., ``\\001'' is one unit wide, ``\\002'' is two
  457. Xunits wide, etc.  The high-order bit (0200) is on if
  458. Xthe character is to be underlined in underline mode
  459. X(.ul).
  460. XThis byte can be zero, indicating zero-length characters (accents, etc),
  461. Xwith the remaining string being non-null.
  462. XThis means that a null character must be expressed as "\\000\\0",
  463. Xnot merely "".
  464. X.B "The latter will cause serious problems for \fInroff\fR!"
  465. XThe rest of the bytes are the characters used to produce the character in
  466. Xquestion.  If the character has the sign (0200) bit on,
  467. Xit is a code to move the terminal in plot mode.  It is
  468. Xencoded as:
  469. X.RS
  470. X.IP "0100 bit on" 15
  471. Xvertical motion.
  472. X.IP "0100 bit off" 15
  473. Xhorizontal motion.
  474. X.IP "040 bit on" 15
  475. Xnegative (up or left) motion.
  476. X.IP "040 bit off" 15
  477. Xpositive (down or right) motion.
  478. X.IP "037 bits" 15
  479. Xnumber of such motions to make.
  480. X.RE
  481. X.TP 10
  482. X.I zzz\^
  483. Xa zero terminator at the end.
  484. X.PP
  485. XAll quantities which are in units of fractions of an inch should
  486. Xbe expressed as
  487. X.RI INCH* num / denom ,
  488. Xwhere
  489. X.I num\^
  490. Xand
  491. X.I denom\^
  492. Xare respectively the numerator and denominator of the fraction; i.e.,
  493. X1/48 of an inch would be written as ``INCH/48''.
  494. X.PP
  495. XIf any sequence of characters does not pertain to the output device,
  496. Xthat sequence should be given as a null string (""),
  497. Xexcept for null \fIcodetab\fR strings,
  498. Xwhich must be given as "\\000\\0".
  499. X.PP
  500. X.SH USAGE
  501. XSource files are prepared for the drivers by using an editor to
  502. Xcreate a
  503. X.BI tab name .c
  504. Xfile which contains an initialized
  505. X.B t
  506. Xstructure,
  507. Xor by first using
  508. X.I elbat
  509. Xto de-compile an existing system driver table into source,
  510. Xand modifying that source to suit.
  511. XThe
  512. X.BI tab name .c
  513. Xfile is placed in the
  514. X.I table
  515. Xutility source directory,
  516. Xand the
  517. X.B Makefile
  518. Xis edited to include
  519. X.BI tab name .c
  520. Xin the
  521. X.B SOURCES
  522. Xdefinition.
  523. XTyping
  524. X.I make
  525. Xmakes all the driver tables.
  526. XTyping
  527. X.I make install
  528. Xinstalls them in the
  529. X.B /usr/lib/term
  530. Xdirectory.
  531. X.P
  532. X.I Elbat
  533. X.BI /usr/lib/term/tab name
  534. Xdecompiles that driver table,
  535. Xand puts the source code to standard output.
  536. XThe
  537. X.B -d
  538. Xoption includes as comments extensive debug information.
  539. X.SH FORMAT
  540. XThe structure of the driver tables is a single integer
  541. X.IR c_size ,
  542. Xfollowed by a structure
  543. X.IR t_stor ,
  544. Xfollowed by an array of character data
  545. X.I c_data
  546. Xof
  547. X.I c_size
  548. Xbytes.
  549. XThe size of the driver table in bytes is therefore:
  550. X.br
  551. X.nf
  552. X     \fBsizeof (\fIint\fB) + \fBsizeof (\fIstruct t_stor\fB) + \fIc_size\fR.
  553. X.fi
  554. XThe structure t_stor is identical to the structure
  555. X.B t
  556. Xexcept that all character pointers are replaced by integer values
  557. Xwhich index into the c_data character array to indicate the start
  558. Xof each string:
  559. X.PP
  560. X.nf
  561. X.ta 5m 10m 15m 20m 25m 30m 35m 40m 45m 50m 55m 60m
  562. Xstruct t_stor {
  563. X    int bset;
  564. X    int breset;
  565. X    int Hor;
  566. X    int Vert;
  567. X    int Newline;
  568. X    int Char;
  569. X#ifdef KANJI
  570. X    int Kchar;
  571. X#endif KANJI
  572. X    int Em;
  573. X    int Halfline;
  574. X    int Adj;
  575. X    int twinit;
  576. X    int twrest;
  577. X    int twnl;
  578. X    int hlr;
  579. X    int hlf;
  580. X    int flr;
  581. X    int bdon;
  582. X    int bdoff;
  583. X    int iton;
  584. X    int itoff;
  585. X    int ploton;
  586. X    int plotoff;
  587. X    int up;
  588. X    int down;
  589. X    int right;
  590. X    int left;
  591. X    int codetab[256-32];
  592. X    int zzz;
  593. X};
  594. X.SH BUGS
  595. XBecause the binary format of the
  596. X.I nroff
  597. Xdriver tables has been inferred from a small number of samples of
  598. Xsupplied tables on only one system,
  599. Xthe portability of the
  600. X.I table
  601. Xutility is not assured.
  602. X.fi
  603. X.DT
  604. X.PP
  605. X.SH FILES
  606. X/usr/lib/term/tab\fIname\fR    driver tables accessible to nroff
  607. X.br
  608. Xtab\fIname\fR.c                source for driver tables
  609. X.br
  610. Xtab\fIname\fR.tab            compiled driver tables
  611. X.SH AUTHOR
  612. XBruce Townsend (bnr-vpa!bruce)
  613. X.SH SEE ALSO
  614. Xnroff(1)
  615. SHAR_EOF
  616. if test 8271 -ne "`wc -c 'table.5'`"
  617. then
  618.     echo shar: error transmitting "'table.5'" '(should have been 8271 characters)'
  619. fi
  620. echo shar: extracting "'elbat.c'" '(6793 characters)'
  621. if test -f 'elbat.c'
  622. then
  623.     echo shar: over-writing existing file "'elbat.c'"
  624. fi
  625. sed 's/^X//' << \SHAR_EOF > 'elbat.c'
  626. X/*
  627. X    table (version 2.0) - a utility for creating nroff driver tables.
  628. X
  629. X    elbat:  a program to de-compile nroff terminal driver tables.
  630. X        Written by Bruce Townsend Oct, 1987.
  631. X        Based on a program by:
  632. X        Matt Crawford, University of Chicago, 10 May 1984
  633. X
  634. X    Copyright (c) 1987 by Bruce Townsend and Bell-Northern Research.
  635. X    Permission is granted to use and distribute, except for profit,
  636. X    providing this copyright notice and the author's name is included.
  637. X    No warranty of any kind is expressed or implied, and no liability of
  638. X    any kind is assumed by either the author or Bell-Northern Research.
  639. X*/
  640. X
  641. X#include <stdio.h>
  642. X#include <ctype.h>
  643. X#include <fcntl.h>
  644. X#include <sys/types.h>
  645. X#include <sys/stat.h>
  646. X#include "table.h"
  647. X
  648. Xextern char    *structure;
  649. X
  650. Xchar    *codelabel[] = {
  651. X    "space",    "!",    "\"",    "#",    "$",    "%",    "&",
  652. X    "' close",    "(",    ")",    "*",    "+",    ",",    "- hyphen",
  653. X    ".",    "/",    "0",    "1",    "2",    "3",    "4",    "5",
  654. X    "6",    "7",    "8",    "9",    ":",    ";",    "<",    "=",
  655. X    ">",    "?",    "@",    "A",    "B",    "C",    "D",    "E",
  656. X    "F",    "G",    "H",    "I",    "J",    "K",    "L",    "M",
  657. X    "N",    "O",    "P",    "Q",    "R",    "S",    "T",    "U",
  658. X    "V",    "W",    "X",    "Y",    "Z",    "[",    "\\",    "]",
  659. X    "^",    "_ dash",    "` open",    "a",    "b",    "c",
  660. X    "d",    "e",    "f",    "g",    "h",    "i",    "j",    "k",
  661. X    "l",    "m",    "n",    "o",    "p",    "q",    "r",    "s",
  662. X    "t",    "u",    "v",    "w",    "x",    "y",    "z",    "{",
  663. X    "|",    "}",    "~",    "narrow sp",    "hyphen",    "bullet",
  664. X    "square",    "3/4 em",    "rule",    "1/4",    "1/2",    "3/4",
  665. X    "minus",    "fi",    "fl",    "ff",    "ffi",    "ffl",    "degree",
  666. X    "dagger",    "section",    "foot mark",    "acute accent",
  667. X    "grave accent",    "underrule",    "slash (longer)",
  668. X    "half narrow space",    "unpaddable space",    "alpha",
  669. X    "beta",    "gamma",    "delta",    "epsilon",    "zeta",
  670. X    "eta",    "theta",    "iota",    "kappa",    "lambda",
  671. X    "mu",    "nu",    "xi",    "omicron",    "pi",    "rho",    "sigma",
  672. X    "tau",    "upsilon",    "phi",    "chi",    "psi",    "omega",
  673. X    "Gamma",    "Delta",    "Theta",    "Lambda",
  674. X    "Xi",    "Pi",    "Sigma",    "Tau",    "Upsilon",    "Phi",
  675. X    "Psi",    "Omega",    "square root",    "terminal sigma",
  676. X    "root en",    ">=",    "<=",    "identically equal",
  677. X    "equation minus",    "approx =",    "approximates",
  678. X    "not equal",    "right arrow",    "left arrow",    "up arrow",
  679. X    "down arrow",    "eqn equals",    "multiply",    "divide",
  680. X    "plus-minus",    "cup (union)",    "cap (intersection)",    "subset of",
  681. X    "superset of",    "improper subset",    " improper superset",
  682. X    "infinity",    "pt deriv",    "gradient",    "not",    "integral",
  683. X    "proportional to",    "empty set",    "member of",
  684. X    "equation plus",    "registration mk",    "copyright mk",
  685. X    "box rule",    "cent sign",    "dbl dagger",    "right hand",
  686. X    "left hand",    "math * ",    "bell system sign",
  687. X    "or (was star)",    "circle",    "left top of big curly",
  688. X    "left bottom of big curly",    "right top of big curly",
  689. X    "right bottom of big curly",    "left center of big curly",
  690. X    "right center of big curly",    "bold vertical rule",
  691. X    "left bottom of big bracket",    "right bottom of big bracket",
  692. X    "left top of big bracket",    "right top of big bracket",
  693. X    "???",    "???",    "???",    "???",    "???",    "???",    "???",    "???",
  694. X    "???",    "???",    "???",    "???",    "???",    /* The last 13 are unused */
  695. X};
  696. X
  697. Xstruct t t;
  698. Xstruct t_stor t_stor;
  699. Xchar    *mptr;        /* Pointer to the character data */
  700. Xint    c_size;        /* The amount of character data in bytes */
  701. Xint    debug;
  702. X
  703. X#define intshow(memb)    printf ("/*%-8s*/\t\t%d,\n", "memb", t.memb)
  704. X#define show(memb)    printf ("/*%-8s*/\t\t\"", "memb");\
  705. X            vprint (t.memb);\
  706. X            if (debug) printf("\",\t\t/*\t%d\t*/\n", t_stor.memb);\
  707. X            else printf ("\",\n")
  708. X#define getptr(memb)    t.memb = mptr + t_stor.memb
  709. X
  710. Xmain(argc, argv)
  711. Xchar    **argv;
  712. X{
  713. X    int    c, i;
  714. X    char    labelbuf[64];
  715. X
  716. X    if (argc == 3 && argv[1][0] == '-' && argv[1][1] == 'd') debug = 1;
  717. X    if (argc != 2 && !debug) {
  718. X        fprintf (stderr, "Usage: elbat [-d] tabfile > tabfile.c\n");
  719. X        exit(1);
  720. X    }
  721. X
  722. X    loadtab(argv[argc - 1]);
  723. X    
  724. X    printf ("%s} t =\t{\n", structure);
  725. X    printf ("/*bset    */\t\t0%o,\n", t.bset);
  726. X    printf ("/*breset  */\t\t0%o,\n", t.breset);
  727. X    intshow (Hor);
  728. X    intshow (Vert);
  729. X    intshow (Newline);
  730. X    intshow (Char);
  731. X#ifdef KANJI
  732. X    intshow (Kchar);
  733. X#endif KANJI
  734. X    intshow (Em);
  735. X    intshow (Halfline);
  736. X    intshow (Adj);
  737. X    if (debug) printf ("/* name\t\t\tstring\t\t\tindex into c_data */\n");
  738. X    show (twinit);
  739. X    show (twrest);
  740. X    show (twnl);
  741. X    show (hlr);
  742. X    show (hlf);
  743. X    show (flr);
  744. X    show (bdon);
  745. X    show (bdoff);
  746. X    show (iton);
  747. X    show (itoff);
  748. X    show (ploton);
  749. X    show (plotoff);
  750. X    show (up);
  751. X    show (down);
  752. X    show (right);
  753. X    show (left);
  754. X
  755. X    for (c = 0; c < 256 - 32 - 13; c++) {
  756. X        sprintf (labelbuf, "/* %s */", codelabel[c]);
  757. X        printf ("%-20s\t\"", labelbuf);
  758. X        if (t.codetab[c][0])
  759. X        vprint (t.codetab[c]);
  760. X        else if (t.codetab[c][1]) {
  761. X        printf ("\\000");
  762. X        vprint (t.codetab[c]+1);
  763. X        }
  764. X        else
  765. X        printf ("\\000\\0");
  766. X
  767. X        if (debug) printf("\",\t\t/*\t%d\t*/\n", t_stor.codetab[c]);
  768. X        else printf ("\",\n");
  769. X    }
  770. X    printf ("};\n");
  771. X
  772. X    if (debug) {
  773. X        printf ("\n/* Character data dump: Size = %d bytes\n", c_size);
  774. X        for (i = 0; i < c_size; i++) {
  775. X        if (! (i % 10)) printf ("\n%6d  ", i);
  776. X        chprint ((unsigned char) mptr[i]);
  777. X        }
  778. X        printf ("\n*/\n");
  779. X    }
  780. X
  781. X    exit (0);
  782. X}
  783. X
  784. Xvprint (str)
  785. Xchar    *str;
  786. X{
  787. X    if (!str) return;
  788. X    while (*str) {
  789. X        char    c[5];
  790. X
  791. X        if (isascii (*str) && isprint (*str)
  792. X                   && *str != '\\' && *str != '"' ) {
  793. X        c[0] = *str;
  794. X        c[1] = '\0';
  795. X        }
  796. X        else {
  797. X        switch (*str) {
  798. X        case '\\':
  799. X            strcpy (c, "\\\\");
  800. X            break;
  801. X        case '"':
  802. X            strcpy (c, "\\\"");
  803. X            break;
  804. X        case '\b':
  805. X            strcpy (c, "\\b");
  806. X            break;
  807. X        case '\t':
  808. X            strcpy (c, "\\t");
  809. X            break;
  810. X        case '\n':
  811. X            strcpy (c, "\\n");
  812. X            break;
  813. X        case '\r':
  814. X            strcpy (c, "\\r");
  815. X            break;
  816. X        default:
  817. X            sprintf (c, "\\%3.3o", (int)*str & 0377);
  818. X            break;
  819. X        }
  820. X        }
  821. X    printf ("%s", c);
  822. X    str++;
  823. X    }
  824. X}
  825. X
  826. Xchprint (c)
  827. Xunsigned char    c;
  828. X{
  829. X    if (isascii (c) && isgraph (c)) printf ("    %c", c);
  830. X    else if (c) printf (" \\%.3o", c);
  831. X    else printf (" ----");
  832. X}
  833. X
  834. Xloadtab (tname)
  835. Xchar    *tname;
  836. X{
  837. X    int    tfd, c;
  838. X    char    *malloc();
  839. X    struct stat    statbuf;
  840. X
  841. X    if ((tfd=open (tname, O_RDONLY)) < 0 ) {
  842. X        perror (tname);
  843. X        exit (1);
  844. X    }
  845. X    fstat (tfd, &statbuf);
  846. X    read (tfd, &c_size, sizeof (int));
  847. X    read (tfd, &t_stor, sizeof (t_stor));
  848. X    mptr = malloc (c_size);
  849. X    read (tfd, mptr, c_size);
  850. X    c = sizeof (int) + sizeof (t_stor) + c_size;
  851. X    if (c != statbuf.st_size) fprintf (stderr,
  852. X    "WARNING: %s size: %d bytes (should be %d), output likely corrupt\n",
  853. X        tname, statbuf.st_size, c);
  854. X
  855. X    t.bset = t_stor.bset;
  856. X    t.breset = t_stor.breset;
  857. X    t.Hor = t_stor.Hor;
  858. X    t.Vert = t_stor.Vert;
  859. X    t.Newline = t_stor.Newline;
  860. X    t.Char = t_stor.Char;
  861. X#ifdef KANJI
  862. X    t.Kchar = t_stor.Kchar;
  863. X#endif KANJI
  864. X    t.Em = t_stor.Em;
  865. X    t.Halfline = t_stor.Halfline;
  866. X    t.Adj = t_stor.Adj;
  867. X    getptr (twinit);
  868. X    getptr (twrest);
  869. X    getptr (twnl);
  870. X    getptr (hlr);
  871. X    getptr (hlf);
  872. X    getptr (flr);
  873. X    getptr (bdon);
  874. X    getptr (bdoff);
  875. X    getptr (iton);
  876. X    getptr (itoff);
  877. X    getptr (ploton);
  878. X    getptr (plotoff);
  879. X    getptr (up);
  880. X    getptr (down);
  881. X    getptr (right);
  882. X    getptr (left);
  883. X
  884. X    for (c = 0; c < 256 - 32; c++)
  885. X        getptr (codetab[c]);
  886. X}
  887. SHAR_EOF
  888. if test 6793 -ne "`wc -c 'elbat.c'`"
  889. then
  890.     echo shar: error transmitting "'elbat.c'" '(should have been 6793 characters)'
  891. fi
  892. echo shar: extracting "'table.c'" '(5011 characters)'
  893. if test -f 'table.c'
  894. then
  895.     echo shar: over-writing existing file "'table.c'"
  896. fi
  897. sed 's/^X//' << \SHAR_EOF > 'table.c'
  898. X/*
  899. X    table (version 2.0) - a utility for creating nroff driver tables.
  900. X
  901. X    table:  a program to compile nroff terminal driver tables.
  902. X        Written by Bruce Townsend Oct, 1987.
  903. X
  904. X    Copyright (c) 1987 by Bruce Townsend and Bell-Northern Research.
  905. X    Permission is granted to use and distribute, except for profit,
  906. X    providing this copyright notice and the author's name is included.
  907. X    No warranty of any kind is expressed or implied, and no liability of
  908. X    any kind is assumed by either the author or Bell-Northern Research.
  909. X
  910. X    The contributions of Ian Darwin are gratefully acknowledged.
  911. X*/
  912. X
  913. X#define C_SIZE    20000    /* The maximum amount of character data allowed
  914. X               in the initialized structure t - increase if
  915. X               necessary */
  916. X
  917. X#include <stdio.h>
  918. X#include "table.h"    /* This file contains the definition of the
  919. X               the structures t and t_stor */
  920. X
  921. X/*    The compiled tab file contains three primary elements:
  922. X    -  An integer (c_size) which gives the size in bytes of the character
  923. X       data (the third element of the file).
  924. X    -  The structure t_stor, which contains integer data and integer
  925. X       indices into the character data that follows.
  926. X    -  c_size bytes of character data.
  927. X    Note that the file size in bytes is therefore:
  928. X    c_size + sizeof (int) + sizeof (t_stor)
  929. X*/
  930. X
  931. Xextern struct t t;    /* Defined in the tab file source */
  932. Xstruct t_stor t_stor;    /* This structure is stored in the compiled tab file */
  933. X
  934. Xchar    c_data[C_SIZE];    /* The character data to be stored in the tab file */
  935. Xint    c_size;        /* The amount of character data in bytes */
  936. X
  937. Xmain (argc, argv)
  938. Xint    argc;
  939. Xchar    *argv[];
  940. X{
  941. X    FILE    *table;
  942. X    int    i;
  943. X
  944. X    if (argc != 2) {    /* Need a file name argument */
  945. X        fprintf (stderr, "Usage: table tabfilename\n");
  946. X        exit (1);
  947. X    }
  948. X
  949. X    if ((table = fopen (argv[1], "w")) == NULL) {    /* Open the file */
  950. X        fprintf (stderr, "Could not open file %s for writing\n", argv[1]);
  951. X        exit (1);
  952. X    }
  953. X
  954. X    /* Copy the integer values from the initialized structure t
  955. X       to the storage structure t_stor */
  956. X    t_stor.bset = t.bset;
  957. X    t_stor.breset = t.breset;
  958. X    t_stor.Hor = t.Hor;
  959. X    t_stor.Vert = t.Vert;
  960. X    t_stor.Newline = t.Newline;
  961. X    t_stor.Char = t.Char;
  962. X#ifdef KANJI
  963. X    t_stor.Kchar = t.Kchar;
  964. X#endif KANJI
  965. X    t_stor.Em = t.Em;
  966. X    t_stor.Halfline = t.Halfline;
  967. X    t_stor.Adj = t.Adj;
  968. X
  969. X    /* Find each string in the character data table c_data, or add it to
  970. X       the table if it is not there, and provide an index to it which
  971. X       is stored in t_stor */
  972. X    t_stor.twinit = addstring (t.twinit);
  973. X    t_stor.twrest = addstring (t.twrest);
  974. X    t_stor.twnl = addstring (t.twnl);
  975. X    t_stor.hlr = addstring (t.hlr);
  976. X    t_stor.hlf = addstring (t.hlf);
  977. X    t_stor.flr = addstring (t.flr);
  978. X    t_stor.bdon = addstring (t.bdon);
  979. X    t_stor.bdoff = addstring (t.bdoff);
  980. X    t_stor.iton = addstring (t.iton);
  981. X    t_stor.itoff = addstring (t.itoff);
  982. X    t_stor.ploton = addstring (t.ploton);
  983. X    t_stor.plotoff = addstring (t.plotoff);
  984. X    t_stor.up = addstring (t.up);
  985. X    t_stor.down = addstring (t.down);
  986. X    t_stor.right = addstring (t.right);
  987. X    t_stor.left = addstring (t.left);
  988. X    for (i = 0; i < 256 - 32; i++)
  989. X        t_stor.codetab[i] = addchar (t.codetab[i]);
  990. X    t_stor.zzz = 0;        /* The null terminator */
  991. X
  992. X    /* Write to the tab file the amount of character data in bytes,
  993. X       the structure t_stor, and the character data */
  994. X    if (fwrite (&c_size, sizeof (c_size), 1, table) != 1 ||
  995. X        fwrite (&t_stor, sizeof (t_stor), 1, table) != 1 ||
  996. X        fwrite (c_data, sizeof (*c_data), c_size, table) != c_size) {
  997. X        fprintf (stderr, "Write to file failed\n");
  998. X        exit (1);
  999. X    }
  1000. X
  1001. X    /* Close the tab file */
  1002. X    if (fclose (table)) {
  1003. X        fprintf (stderr, "File %s not closed properly\n", argv[1]);
  1004. X        exit (1);
  1005. X    }
  1006. X}
  1007. X
  1008. Xaddstring (string)
  1009. Xchar    *string;
  1010. X{
  1011. X    if (string)    /* If pointer is non-zero add string to table */
  1012. X        return (string_search (string, strlen (string) + 1));
  1013. X
  1014. X    else        /* If pointer is zero return 0 index */
  1015. X        return (0);
  1016. X}
  1017. X
  1018. Xaddchar (string)
  1019. Xchar    *string;
  1020. X{
  1021. X    if (string)    /* If pointer is non-zero add string to table */
  1022. X            /* Note that the string is at least 2 chars long
  1023. X               and that the first 2 bytes may be null */
  1024. X        return (string_search (string, strlen (string + 2) + 3));
  1025. X
  1026. X    else        /* If pointer is zero return 0 index */
  1027. X        return (0);
  1028. X}
  1029. X
  1030. X/*    string_search searches through the character array c_data to
  1031. X    find the string.  If found, the routine returns an integer
  1032. X    index that locates the string in c_data.  If it is not
  1033. X    found, the string is added to c_data, and c_size, the amount
  1034. X    of data in c_data, is updated.
  1035. X*/
  1036. Xstring_search (string, length)
  1037. Xchar    *string;    /* The string to find in or add to the table */
  1038. Xint    length;        /* The string length including the null terminator */
  1039. X{
  1040. X    int    s_index, c_index, match;
  1041. X    char    *pointer;
  1042. X
  1043. X    for (s_index = 0; s_index <= c_size - length; s_index++) {
  1044. X        pointer = string;
  1045. X        match = 1;
  1046. X        for (c_index = s_index; c_index < s_index + length;) {
  1047. X        if (*pointer++ != c_data[c_index++]) {
  1048. X            match = 0;
  1049. X            break;
  1050. X        }
  1051. X        }
  1052. X        if (match) return (s_index);
  1053. X    }
  1054. X
  1055. X    s_index = c_size;
  1056. X    while (length--)
  1057. X        c_data[c_size++] = *string++;
  1058. X
  1059. X    return (s_index); 
  1060. X}
  1061. SHAR_EOF
  1062. if test 5011 -ne "`wc -c 'table.c'`"
  1063. then
  1064.     echo shar: error transmitting "'table.c'" '(should have been 5011 characters)'
  1065. fi
  1066. echo shar: extracting "'table.h'" '(876 characters)'
  1067. if test -f 'table.h'
  1068. then
  1069.     echo shar: over-writing existing file "'table.h'"
  1070. fi
  1071. sed 's/^X//' << \SHAR_EOF > 'table.h'
  1072. X#ifndef    INCH
  1073. X#define    INCH    240
  1074. X#endif
  1075. X
  1076. Xstruct t {
  1077. X    int bset;
  1078. X    int breset;
  1079. X    int Hor;
  1080. X    int Vert;
  1081. X    int Newline;
  1082. X    int Char;
  1083. X#ifdef KANJI
  1084. X    int Kchar;
  1085. X#endif KANJI
  1086. X    int Em;
  1087. X    int Halfline;
  1088. X    int Adj;
  1089. X    char *twinit;
  1090. X    char *twrest;
  1091. X    char *twnl;
  1092. X    char *hlr;
  1093. X    char *hlf;
  1094. X    char *flr;
  1095. X    char *bdon;
  1096. X    char *bdoff;
  1097. X    char *iton;
  1098. X    char *itoff;
  1099. X    char *ploton;
  1100. X    char *plotoff;
  1101. X    char *up;
  1102. X    char *down;
  1103. X    char *right;
  1104. X    char *left;
  1105. X    char *codetab[256-32];
  1106. X    char *zzz;
  1107. X    };
  1108. X
  1109. Xstruct t_stor {        /* This structure will be stored in the tab file */
  1110. X    int bset;
  1111. X    int breset;
  1112. X    int Hor;
  1113. X    int Vert;
  1114. X    int Newline;
  1115. X    int Char;
  1116. X#ifdef KANJI
  1117. X    int Kchar;
  1118. X#endif KANJI
  1119. X    int Em;
  1120. X    int Halfline;
  1121. X    int Adj;
  1122. X    int twinit;
  1123. X    int twrest;
  1124. X    int twnl;
  1125. X    int hlr;
  1126. X    int hlf;
  1127. X    int flr;
  1128. X    int bdon;
  1129. X    int bdoff;
  1130. X    int iton;
  1131. X    int itoff;
  1132. X    int ploton;
  1133. X    int plotoff;
  1134. X    int up;
  1135. X    int down;
  1136. X    int right;
  1137. X    int left;
  1138. X    int codetab[256-32];
  1139. X    int zzz;
  1140. X};
  1141. SHAR_EOF
  1142. if test 876 -ne "`wc -c 'table.h'`"
  1143. then
  1144.     echo shar: error transmitting "'table.h'" '(should have been 876 characters)'
  1145. fi
  1146. echo shar: extracting "'tabljet.c'" '(9806 characters)'
  1147. if test -f 'tabljet.c'
  1148. then
  1149.     echo shar: over-writing existing file "'tabljet.c'"
  1150. fi
  1151. sed 's/^X//' << \SHAR_EOF > 'tabljet.c'
  1152. X     /*****************************************************************
  1153. X    *                                                                *
  1154. X    *   The following is an initialization for an HP Laserjet+ with  *
  1155. X    *   a Math Elite font cartridge.  The produced table will make   *
  1156. X    *   nroff(1) behave very similar to troff(1) except that only    *
  1157. X    *   one font size is available in nroff(1).  So, for instance,   *
  1158. X    *   is underlining (.ul and .cu) replaced by italic since this   *
  1159. X        *   is what troff(1) does.  Maximum allowed nroff(1) resolution  *
  1160. X    *   (1/240 inch) is utilized.  Pity, since Laserjet+ really has  *
  1161. X    *   1/720 inch resolution.                                       *
  1162. X    *                                                                *
  1163. X    *   This version is for fixed character spacing.                 *
  1164. X    *                                                                *
  1165. X    *   1987-10-31 -- Bo Thide', Swedish Institute of Space Physics, *
  1166. X    *   S-755 90 Uppsala, Sweden.  UUCP: ....enea!kuling!irfu!bt     *
  1167. X    *                                                                *
  1168. X    *****************************************************************/
  1169. X
  1170. X#ifndef    INCH
  1171. X#define    INCH    240
  1172. X#endif
  1173. X
  1174. Xstruct t {
  1175. X    int bset;
  1176. X    int breset;
  1177. X    int Hor;
  1178. X    int Vert;
  1179. X    int Newline;
  1180. X    int Char;
  1181. X#ifdef KANJI
  1182. X    int Kchar;
  1183. X#endif KANJI
  1184. X    int Em;
  1185. X    int Halfline;
  1186. X    int Adj;
  1187. X    char *twinit;
  1188. X    char *twrest;
  1189. X    char *twnl;
  1190. X    char *hlr;
  1191. X    char *hlf;
  1192. X    char *flr;
  1193. X    char *bdon;
  1194. X    char *bdoff;
  1195. X    char *iton;
  1196. X    char *itoff;
  1197. X    char *ploton;
  1198. X    char *plotoff;
  1199. X    char *up;
  1200. X    char *down;
  1201. X    char *right;
  1202. X    char *left;
  1203. X    char *codetab[256-32];
  1204. X    char *zzz;
  1205. X} t =    {
  1206. X/*bset    */        00,
  1207. X/*breset  */        054,
  1208. X/*Hor     */        1,
  1209. X/*Vert    */        1,
  1210. X/*Newline */        40,
  1211. X/*Char    */        20,
  1212. X#ifdef KANJI
  1213. X/*Kchar   */        40,
  1214. X#endif KANJI
  1215. X/*Em      */        20,
  1216. X/*Halfline*/        20,
  1217. X/*Adj     */        20,
  1218. X/*twinit  */        "\033&l0O\033&l66F\033&l6D\033&l3E\033&a0L\033(8U\033)0A",
  1219. X/*twrest  */        "\033&l6D",
  1220. X/*twnl    */        "\n",
  1221. X/*hlr     */        "\033&a-.5R",
  1222. X/*hlf     */        "\033=",
  1223. X/*flr     */        "\033&a-1R",
  1224. X/*bdon    */        "\033(ss5B",
  1225. X/*bdoff   */        "\033(s0B",
  1226. X/*iton    */        "\033(sb1S",
  1227. X/*itoff   */        "\033(s0S",
  1228. X/*ploton  */        "\033&l6D",
  1229. X/*plotoff */        "\033&l6D",
  1230. X/*up      */        "\033&a-3V",
  1231. X/*down    */        "\033&a+3V",
  1232. X/*right   */        "\033&a+3H",
  1233. X/*left    */        "\033&a-3H",
  1234. X/* space */             "\001 ",
  1235. X/* ! */                 "\201!",
  1236. X/* " */                 "\201\"",
  1237. X/* # */                 "\201#",
  1238. X/* $ */                 "\201$",
  1239. X/* % */                 "\201%",
  1240. X/* & */                 "\201&",
  1241. X/* ' close */           "\201'",
  1242. X/* ( */                 "\201(",
  1243. X/* ) */                 "\201)",
  1244. X/* * */                 "\001*",
  1245. X/* + */                 "\001+",
  1246. X/* , */                 "\201,",
  1247. X/* - hyphen */          "\001-",
  1248. X/* . */                 "\001.",
  1249. X/* / */                 "\201/",
  1250. X/* 0 */                 "\0010",
  1251. X/* 1 */                 "\0011",
  1252. X/* 2 */                 "\0012",
  1253. X/* 3 */                 "\0013",
  1254. X/* 4 */                 "\0014",
  1255. X/* 5 */                 "\0015",
  1256. X/* 6 */                 "\0016",
  1257. X/* 7 */                 "\0017",
  1258. X/* 8 */                 "\0018",
  1259. X/* 9 */                 "\0019",
  1260. X/* : */                 "\201:",
  1261. X/* ; */                 "\201;",
  1262. X/* < */                 "\001<",
  1263. X/* = */                 "\001=",
  1264. X/* > */                 "\001>",
  1265. X/* ? */                 "\201?",
  1266. X/* @ */                 "\201@",
  1267. X/* A */                 "\201A",
  1268. X/* B */                 "\201B",
  1269. X/* C */                 "\201C",
  1270. X/* D */                 "\201D",
  1271. X/* E */                 "\201E",
  1272. X/* F */                 "\201F",
  1273. X/* G */                 "\201G",
  1274. X/* H */                 "\201H",
  1275. X/* I */                 "\201I",
  1276. X/* J */                 "\201J",
  1277. X/* K */                 "\201K",
  1278. X/* L */                 "\201L",
  1279. X/* M */                 "\201M",
  1280. X/* N */                 "\201N",
  1281. X/* O */                 "\201O",
  1282. X/* P */                 "\201P",
  1283. X/* Q */                 "\201Q",
  1284. X/* R */                 "\201R",
  1285. X/* S */                 "\201S",
  1286. X/* T */                 "\201T",
  1287. X/* U */                 "\201U",
  1288. X/* V */                 "\201V",
  1289. X/* W */                 "\201W",
  1290. X/* X */                 "\201X",
  1291. X/* Y */                 "\201Y",
  1292. X/* Z */                 "\201Z",
  1293. X/* [ */                 "\001[",
  1294. X/* \ */                 "\001\\",
  1295. X/* ] */                 "\001]",
  1296. X/* ^ */                 "\201^",
  1297. X/* _ dash */            "\201_",
  1298. X/* ` open */            "\201`",
  1299. X/* a */                 "\201a",
  1300. X/* b */                 "\201b",
  1301. X/* c */                 "\201c",
  1302. X/* d */                 "\201d",
  1303. X/* e */                 "\201e",
  1304. X/* f */                 "\201f",
  1305. X/* g */                 "\201g",
  1306. X/* h */                 "\201h",
  1307. X/* i */                 "\201i",
  1308. X/* j */                 "\201j",
  1309. X/* k */                 "\201k",
  1310. X/* l */                 "\201l",
  1311. X/* m */                 "\201m",
  1312. X/* n */                 "\201n",
  1313. X/* o */                 "\201o",
  1314. X/* p */                 "\201p",
  1315. X/* q */                 "\201q",
  1316. X/* r */                 "\201r",
  1317. X/* s */                 "\201s",
  1318. X/* t */                 "\201t",
  1319. X/* u */                 "\201u",
  1320. X/* v */                 "\201v",
  1321. X/* w */                 "\201w",
  1322. X/* x */                 "\201x",
  1323. X/* y */                 "\201y",
  1324. X/* z */                 "\201z",
  1325. X/* { */                 "\001{",
  1326. X/* | */                 "\201|",
  1327. X/* } */                 "\001}",
  1328. X/* ~ */                 "\201~",
  1329. X/* narrow sp */         "\200",
  1330. X/* hyphen */            "\001-",
  1331. X/* bullet */            "\001\033(1QL\033(0@",
  1332. X/* square */            "\001\033(2Ql\033(0@",
  1333. X/* 3/4 em */            "\001\033(0Q-\033(0@",
  1334. X/* rule */              "\001_",
  1335. X/* 1/4 */               "\001\033(0Ew\033(0@",
  1336. X/* 1/2 */               "\001\033(0Ex\033(0@",
  1337. X/* 3/4 */               "\0033/4",
  1338. X/* minus */             "\001\033(0Q-\033(0@",
  1339. X/* fi */                "\202fi",
  1340. X/* fl */                "\202fl",
  1341. X/* ff */                "\202ff",
  1342. X/* ffi */               "\203ffi",
  1343. X/* ffl */               "\203ffl",
  1344. X/* degree */            "\001\033(0Q#\033(0@",
  1345. X/* dagger */            "\001\016>\017",
  1346. X/* section */           "\001\033(0E=\033(0@",
  1347. X/* foot mark */         "\001\033(0Q'\033(0@",
  1348. X/* acute accent */      "\001'",
  1349. X/* grave accent */      "\001`",
  1350. X/* underrule */         "\001_",
  1351. X/* slash (longer) */    "\001/",
  1352. X/* half narrow space */    "\200",
  1353. X/* unpaddable space */    "\001 ",
  1354. X/* alpha */             "\001\016a\017",
  1355. X/* beta */              "\001\016b\017",
  1356. X/* gamma */             "\001\016q\017",
  1357. X/* delta */             "\001\016w\017",
  1358. X/* epsilon */           "\001\016e\017",
  1359. X/* zeta */              "\001\016z\017",
  1360. X/* eta */               "\001\016h\017",
  1361. X/* theta */             "\001\033(0Qh\033(0@",
  1362. X/* iota */              "\001\016i\017",
  1363. X/* kappa */             "\001\016k\017",
  1364. X/* lambda */            "\001\016g\017",
  1365. X/* mu */                "\001\016m\017",
  1366. X/* nu */                "\001\016n\017",
  1367. X/* xi */                "\001\016u\017",
  1368. X/* omicron */           "\001\033(0Qo\033(0@",
  1369. X/* pi */                "\001\016p\017",
  1370. X/* rho */               "\001\016o\017",
  1371. X/* sigma */             "\001\016s\017",
  1372. X/* tau */               "\001\016t\017",
  1373. X/* upsilon */           "\001\016y\017",
  1374. X/* phi */               "\001\016d\017",
  1375. X/* chi */               "\001\016k\017",
  1376. X/* psi */               "\001\016c\017",
  1377. X/* omega */             "\001\016l\017",
  1378. X/* Gamma */             "\001\016+\017",
  1379. X/* Delta */             "\001\016v\017",
  1380. X/* Theta */             "\001\016j\017",
  1381. X/* Lambda */            "\001\016;\017",
  1382. X/* Xi */                "\001\016/\017",
  1383. X/* Pi */                "\001\016*\017",
  1384. X/* Sigma */             "\001\016?\017",
  1385. X/* Tau */               "\001T",
  1386. X/* Upsilon */           "\001\016]\017",
  1387. X/* Phi */               "\001\016.\017",
  1388. X/* Psi */               "\001\016,\017",
  1389. X/* Omega */             "\001\016:\017",
  1390. X/* square root */       "\001\016!\017",
  1391. X/* terminal sigma */    "\001\033(0Q[\033(0@",
  1392. X/* root en */           "\001\033(1Q0\033(0@",
  1393. X/* >= */                "\001\033(0Q^\033(0@",
  1394. X/* <= */                "\001\033(0Q\\\033(0@",
  1395. X/* identically equal */    "\001\016-\017",
  1396. X/* equation minus */    "\001\033(0Q-\033(0@",
  1397. X/* approx = */          "\001\033(0Q?\033(0@",
  1398. X/* approximates */      "\001~",
  1399. X/* not equal */         "\001\033(0Q]\033(0@",
  1400. X/* right arrow */       "\001\016|\017",
  1401. X/* left arrow */        "\001\016~\017",
  1402. X/* up arrow */          "\001\016{\017",
  1403. X/* down arrow */        "\001\016_\017",
  1404. X/* eqn equals */        "\001=",
  1405. X/* multiply */          "\001\033(0Q*\033(0@",
  1406. X/* divide */            "\001\016(\017",
  1407. X/* plus-minus */        "\001\016%\017",
  1408. X/* cup (union) */       "\001\033(1Q5\033(0@",
  1409. X/* cap (intersection) */    "\001\033(1Q6\033(0@",
  1410. X/* subset of */         "\001\033(1Q:\033(0@",
  1411. X/* superset of */       "\001\033(1Q;\033(0@",
  1412. X/* improper subset */    "\001\033(1Q>\033(0@",
  1413. X/*  improper superset */    "\001\033(1Q?\033(0@",
  1414. X/* infinity */          "\001\016<\017",
  1415. X/* pt deriv */          "\001\016F\017",
  1416. X/* gradient */          "\001\016$\017",
  1417. X/* not */               "\001\033(1QH\033(0@",
  1418. X/* integral */          "\001\033(1QU\033(0@",
  1419. X/* proportional to */    "\001\016&\017",
  1420. X/* empty set */         "\001\033(1QX\033(0@",
  1421. X/* member of */         "\001\033(1Q7\033(0@",
  1422. X/* equation plus */     "\001+",
  1423. X/* registration mk */    "\001\033(2Q,\033(0@",
  1424. X/* copyright mk */      "\001\033(2Q-\033(0@",
  1425. X/* box rule */          "\001\033(1Qv\033(0@",
  1426. X/* cent sign */         "\001\033(0E?\033(0@",
  1427. X/* dbl dagger */        "\001\033(1QO\033(0@",
  1428. X/* right hand */        "\001\033(1Q&\033(0@",
  1429. X/* left hand */         "\001\033(1Q(\033(0@",
  1430. X/* math *  */           "\001*",
  1431. X/* bell system sign */    "\001\033(2QS\033(0@",
  1432. X/* or (was star) */     "\001|",
  1433. X/* circle */            "\001\033(1QM\033(0@",
  1434. X/* left top of big curly */    "\001\033(1Qb\033(0@",
  1435. X/* left bottom of big curly */    "\001\033(1Qd\033(0@",
  1436. X/* right top of big curly */    "\001\033(1Qr\033(0@",
  1437. X/* right bottom of big curly */    "\001\033(1Qt\033(0@",
  1438. X/* left center of big curly */    "\001\033(1Qc\033(0@",
  1439. X/* right center of big curly */    "\001\033(1Qs\033(0@",
  1440. X/* bold vertical rule */    "\001\033(1Qu\033(0@",
  1441. X/* left bottom of big bracket */    "\001\033(1Qa\033(0@",
  1442. X/* right bottom of big bracket */    "\001\033(1Qq\033(0@",
  1443. X/* left top of big bracket */    "\001\033(1Q`\033(0@",
  1444. X/* right top of big bracket */    "\001\033(1Qp\033(0@",
  1445. X};
  1446. SHAR_EOF
  1447. if test 9806 -ne "`wc -c 'tabljet.c'`"
  1448. then
  1449.     echo shar: error transmitting "'tabljet.c'" '(should have been 9806 characters)'
  1450. fi
  1451. #    End of shell archive
  1452. exit 0
  1453.  
  1454.  
  1455.  
  1456.  
  1457.